/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  javax.servlet.http.HttpServletRequest
 *  org.springframework.web.bind.annotation.PostMapping
 *  org.springframework.web.bind.annotation.RequestBody
 *  org.springframework.web.bind.annotation.RequestMapping
 *  org.springframework.web.bind.annotation.RestController
 */
package com.gys.spliteController;

import com.gys.controller.BaseController;
import com.gys.spliteService.PayService;
import com.gys.spliteService.data.GetLoginOutData;
import com.gys.spliteService.data.GetPayInData;
import com.gys.spliteService.data.JsonResult;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value={"/operation/pay/"})
public class PaySpliteController
extends BaseController {
    @Resource
    private PayService payService;

    @PostMapping(value={"payTypeList"})
    public JsonResult payTypeList(HttpServletRequest request, @RequestBody GetPayInData inData) {
        GetLoginOutData userInfo = this.getSpliteLoginUser();
        inData.setClientId(userInfo.getClient());
        return JsonResult.success(this.payService.payTypeList(inData), "\u63d0\u793a\uff1a\u83b7\u53d6\u6570\u636e\u6210\u529f\uff01");
    }

    @PostMapping(value={"payInfo"})
    public JsonResult payInfo(HttpServletRequest request, @RequestBody GetPayInData inData) {
        GetLoginOutData userInfo = this.getSpliteLoginUser();
        inData.setClientId(userInfo.getClient());
        return JsonResult.success(this.payService.payInfo(inData), "\u63d0\u793a\uff1a\u83b7\u53d6\u6570\u636e\u6210\u529f\uff01");
    }

    @PostMapping(value={"payCommit"})
    public JsonResult payCommit(HttpServletRequest request, @RequestBody GetPayInData inData) {
        GetLoginOutData userInfo = this.getSpliteLoginUser();
        inData.setClientId(userInfo.getClient());
        this.payService.payCommit(inData);
        return JsonResult.success(null, "\u63d0\u793a\uff1a\u83b7\u53d6\u6570\u636e\u6210\u529f\uff01");
    }
}

